A liquid level detector having a float floating on a liquid surface, a magnet retained by the float, and a switch mechanism such as a reed switch to switch from an off-state to an on-state by the movement of the magnet in the gravity direction, such as an oil level sensor disclosed in Patent Document 1 for example, has heretofore been known. A casing of the oil level sensor is configured by assembling a cover to cover a float to a housing having a tube section to contain a switch mechanism.